import { getPrescriptionPicAPI } from "@/apis/consult"
import { showImagePreview, showToast } from "vant"

export const useOrderPre = () => {
    const showMed = async (id?: string) => {
        // console.log(id)
        // 点击原始处方调用接口查看图片
        if (id) {
          const img = await getPrescriptionPicAPI(id)
          // console.log(img)
          showImagePreview([img.data.url])
        }
        else{
            showToast('暂无处方')
        }
      }
      return{
        showMed
      }
}